<?php
// 检查菜单详细信息
$host = '127.0.0.1';
$port = 3306;
$database = 'qiandao';
$username = 'root';
$password = 'root';

try {
    $pdo = new PDO("mysql:host={$host};port={$port};dbname={$database};charset=utf8mb4", $username, $password);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    
    echo "=== 检查所有菜单详细信息 ===\n\n";
    
    $stmt = $pdo->query("SELECT id, pid, title, icon, url, node, params, target, sort, status FROM system_menu ORDER BY sort DESC, id ASC");
    $menus = $stmt->fetchAll(PDO::FETCH_ASSOC);
    
    foreach ($menus as $menu) {
        echo "ID: {$menu['id']}\n";
        echo "  标题: {$menu['title']}\n";
        echo "  父ID: {$menu['pid']}\n";
        echo "  节点: {$menu['node']}\n";
        echo "  URL: {$menu['url']}\n";
        echo "  状态: {$menu['status']}\n";
        echo "  排序: {$menu['sort']}\n";
        echo "\n";
    }
    
} catch (PDOException $e) {
    echo "错误: " . $e->getMessage() . "\n";
}

